import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import Demo from './views/Demo.vue'
import Weather from './views/Weather.vue'
import student from './views/student.vue'
import b64 from './views/b64.vue'
import book from './views/book.vue'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
    },
      //示例
    {
      path:'/demo',
      name:'demo',
      component:Demo,

    },
      //天气
    {
      path:'/weather',
      name:'weather',
      component:Weather,
    },
      //学生
    {
      path:'/student',
      name:'student',
      component:student,
    },
      //base64编码
    {
      path:'/b64',
      name:'b64',
      component:b64
    }
  ]
})
